package com.cltech.service.sys;

import com.cltech.dto.SysPermissionDto;
import com.cltech.dto.TreeNode;
import com.cltech.entity.sys.SysPermission;
import com.cltech.entity.sys.SysRole;
import com.cltech.entity.sys.SysUser;
import com.cltech.frame.base.BaseService;
import com.cltech.frame.result.ResponseBean;
import org.springframework.data.domain.Page;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * Created by Administrator on 2019/4/14.
 */
public interface SysPermissionService extends BaseService<SysPermission, String> {
    Page<SysPermissionDto> findAll(Map<String, String[]> queryParameters, int pageNo, int pageSize);
    ResponseBean<SysPermission> addOrUpdate(SysPermissionDto dto);
    ResponseBean<Set<SysPermission>> findByIdIsIn(List<String> ids);
    ResponseBean<SysPermission> findByPermissionCode(String permissionCode);
    ResponseBean<List<TreeNode>>permissionTree(Map<String, String[]> queryParameters);
    ResponseBean<List<TreeNode>> findPermissionsTreeByRole(String roleId, String sysPermissionType, Integer sysPermissionlevel);
    ResponseBean<List<TreeNode>> findAllPermissionsTreeByRole(String roleId, String sysPermissionType, Integer sysPermissionlevel);
    ResponseBean<List<TreeNode>>findPermissionsTreeByUser(String userId, String sysPermissionType, Integer sysPermissionlevel);
}
